From: Behnam Esfahbod Date: Mon, 7 Aug 2017 18:44:34 +0000 (-0700) Subject: [docs/manifest] Add Virtual Manifest section X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~7^2~26^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=3f5ca7b53f2fbf098dc6b60069fc1335b81727af;p=cargo.git [docs/manifest] Add Virtual Manifest section Current documentation does not mention Virtual Manifests at all, which can be confusing because they appear in error messages. Here we add the definition, and provide a hint about `--all` option for most cargo commands, which allow the command to work in the way most probably expected. Fixes --- diff --git a/src/doc/manifest.md b/src/doc/manifest.md index 25bdf388f..49075ca35 100644 --- a/src/doc/manifest.md +++ b/src/doc/manifest.md @@ -48,9 +48,9 @@ This field specifies a URL to a website hosting the crate's documentation. If no URL is specified in the manifest file, [crates.io][cratesio] will automatically link your crate to the corresponding [docs.rs][docsrs] page. -Documentation links from specific hosts are blacklisted. Hosts are added -to the blacklist if they are known to not be hosting documentation and are -possibly of malicious intent e.g. ad tracking networks. URLs from the +Documentation links from specific hosts are blacklisted. Hosts are added +to the blacklist if they are known to not be hosting documentation and are +possibly of malicious intent e.g. ad tracking networks. URLs from the following hosts are blacklisted: - rust-ci.org @@ -485,6 +485,18 @@ and also be a member crate of another workspace (contain `package.workspace`). Most of the time workspaces will not need to be dealt with as `cargo new` and `cargo init` will handle workspace configuration automatically. +## Virtual Manifest + +In workspace manifests, if the `package` table is present, the workspace root +crate will be treated as a normal package, as well as a worksapce. If the +`package` table is not present in a worksapce manifest, it is called a *virtual +manifest*. + +When working with *virtual manifests*, package-related cargo commands, like +`cargo build`, won't be available anymore. But, most of such commands support +the `--all` option, will execute the command for all the non-virtual manifest in +the workspace. + # The project layout If your project is an executable, name the main source file `src/main.rs`. If it